Array.prototype.myEvery = function(fn) {
    if (typeof fn !== 'function') {
        throw new TypeError('fn must be a function');
    };

    let arr = Object(this);
    for (let i = 0; i < arr.length; i++) {
        let res = fn.call(this, arr[i], i, arr);
        if (!res) {
            return false;
        };
    };

    return true;

};


console.log([12, 54, 18, 130, 44].myEvery(x => x >= 10))